<template>
	<view class="" :style="'height:'+screenHeight+'px;'">
			<view class="none" v-if="show">
				<view class="coent">
					<u-empty text="暂无详情" mode="list" icon-size="200">
					</u-empty>
				</view>
			</view>
			<view class="conentaa" v-else>
				<view class="mrjzr">
					<span>就诊人:&ensp;{{jzr.Name}}</span>
					<span>男</span>
				</view>
				<view class="toptext">
					<span class="tiaoaa">|</span>
					<span class=" font30">视力</span>
				</view>
				<view class="listslbg borbotm">
					<view class="slbgzuo"></view>
					<view class="slbgzhong">[L]</view>
					<view class="slbgzhong">[R]</view>
				</view>
				<view class="listslbg borbotm">
					<view class="slbgzuo">裸眼视力</view>
					<view class="slbgzhong">{{datalist.lysl_y}}</view>
					<view class="slbgzhong">{{datalist.lysl_z}}</view>
				</view>
				<view class="listslbg borbotm">
					<view class="slbgzuo">矫正视力</view>
					<view class="slbgzhong">{{datalist.jzsl_y}}</view>
					<view class="slbgzhong">{{datalist.jzsl_z}}</view>
				</view>
				<view class="toptext">
					<span class="tiaoaa">|</span>
					<span class=" font30">屈光筛查</span>
				</view>
				<view class="listslbg borbotm">
					<view class="slbgzuo"></view>
					<view class="slbgzhong">[L]</view>
					<view class="slbgzhong">[R]</view>
				</view>
				<view class="listslbg borbotm">
					<view class="slbgzuo">球镜</view>
					<view class="slbgzhong">{{datalist.qj_y}}</view>
					<view class="slbgzhong">{{datalist.qj_y}}</view>
				</view>
				<view class="listslbg borbotm">
					<view class="slbgzuo">柱镜</view>
					<view class="slbgzhong">{{datalist.zj_y}}</view>
					<view class="slbgzhong">{{datalist.zj_z}}</view>
				</view>
				<view class="listslbg borbotm">
					<view class="slbgzuo">轴向</view>
					<view class="slbgzhong">{{datalist.zx_y}}</view>
					<view class="slbgzhong">{{datalist.zx_z}}</view>
				</view>
				<view class="listslbg borbotm">
					<view class="slbgzuo">等效球镜</view>
					<view class="slbgzhong">{{datalist.dxqj_y}}</view>
					<view class="slbgzhong">{{datalist.dxqj_z}}</view>
				</view>
				<view class="listslbg borbotm">
					<view class="slbgzuo">瞳孔大小</view>
					<view class="slbgzhong">{{datalist.tkdx_y}}</view>
					<view class="slbgzhong">{{datalist.tkdx_z}}</view>
				</view>
				<view class="listslbg borbotm">
					<view class="slbgzuo">瞳距</view>
					<view class="slbgzhong">{{datalist.tj}}</view>
					<view class="">
						
					</view>
				</view>
				
				<!-- <view class="slbglist">
					<view class="zs">
						<span>综述建议</span>
					</view>
					<view class="zs">
						<u-icon name="arrow-right"></u-icon>
					</view>
				</view> -->
				<view class="slbglist">
					<view class="zs">
						<span>电话解读</span>
					</view>
					<view class="zs" style="">
						<span>18505168129</span>&ensp;
						<u-icon name="phone" color="#0194fc" ></u-icon>
					</view>
				</view>
				
				<view class="zs" style="padding-bottom: 60rpx;">
					<span>视力低于4.9,请及时去眼科医院复查</span>
				</view>
			</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show:false,
				main:'',
				jzr:'',
				dataUrl: '',
				screenHeight: getApp().globalData.screenHeight-44,
				datalist:''
				}
		},
		onLoad:function(option){
			this.datalist=JSON.parse(option.data)
			this.defaultInfo()
		},
		methods: {
			defaultInfo(){
				this.$request("patient","defaultInfo").then(res => {
					console.log("获取默认就诊人", res)
					if (res.code == 1) {
						this.jzr=res.data
					} else {
						uni.showToast({
							title: res.msg,
							icon: 'none',
							duration: 2000
						});
					}
				}).catch(err => {
					uni.showToast({
						title: err,
						icon: 'none',
						duration: 1000
					});
				});
			},
			list() {
				uni.showLoading({
					title: '请稍后',
					mask: true
				});
				this.$request("xzfx","pacstejian",{main:this.main}).then(res => {
					console.log("报告查询", res)
					if (res.code == 1) {
						this.dataUrl = res.data.resultdata.data
						this.show=false
						uni.hideLoading();
					} else {
						this.show=true
						uni.hideLoading();
						uni.showToast({
							title: res.msg,
							icon: 'none',
							duration: 2000
						});
					}
				}).catch(err => {
					this.show=true
					uni.hideLoading();
					console.log("err", err)
					uni.showToast({
						title: err,
						icon: 'none',
						duration: 1000
					});
				});
			}
		}
	}
</script>

<style>
	@import './bgcx.css';
</style>